According to image compression methods such as MPEG-1, MPEG-2, or MPEG-4 H.264/MPEG-4 advanced video coding (AVC), an image is split into blocks having a predetermined size, and then, residual data of the blocks is obtained by inter prediction or intra prediction. Residual data is compressed by transformation, quantization, scanning, run length coding, and entropy coding. In entropy coding, a syntax element such as a transformation coefficient or a motion vector is entropy encoded to output a bit stream. At a decoder's end, a syntax element is extracted from a bit stream, and decoding is performed based on the extracted syntax element.